# -*- encoding: utf-8 -*-
"""
@File    : util.py
@Author  : lilong
@Time    : 2022/5/3 5:28 下午
"""

import os
import json


def read_json(file_path):
    with open(file_path, 'r', encoding='utf-8') as f:
        data_dic = json.load(f)
    return data_dic


def write_json(file_path, lines):
    with open(file_path, 'w', encoding='utf-8') as f:
        f.write(json.dumps(lines, indent=2, ensure_ascii=False))
